package main

import (
	"deque"
	"fmt"
)

func main() {
	fmt.Println("-----------------Deque-----------------")

	dq := deque.New()
	arr := [...]rune{'a', 'b', 'c', 'd', 'e'}
	for _, v := range arr {
		dq.AddLast(v)
		fmt.Println(dq)
	}
	first := dq.RemoveFirst()
	fmt.Println(first, dq.GetFirst(), dq)
	last := dq.RemoveLast()
	fmt.Println(last, dq.GetLast(), dq)

	dq.Clear()
	for _, v := range arr {
		dq.AddFirst(v)
		fmt.Println(dq)
	}
}
